package com.bestcem.xm.member.grpc.service.param.export;

import com.alibaba.fastjson.annotation.JSONField;
import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 联系人导出参数
 * @date 2021-07-24
 */
@Getter
@Setter
public class ExportMemberParam {
    /**
     * 企业标识
     */
    @JSONField(name = "orgId")
    @NotBlank(message = "企业标识不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识格式错误")
    private String orgId;

    /**
     * 联系人类型
     */
    @JSONField(name = "mtype")
    @NotNull(message = "联系人类型不能为空")
    private Integer memberType;

    /**
     * 联系人标识列表
     */
    @JSONField(name = "filter_member_ids")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "联系人标识格式错误")
    private List<String> ids;

    /**
     * 关键字模糊查询正则模式
     */
    private String pattern;

    /**
     * 联系人信息过滤条件
     */
    private String condition;

    /**
     * 操作人标识
     */
    @JSONField(name = "uid")
    private String opUserId;
}
